import React from 'react'
import { Navigate } from "react-router-dom";

export default function Tool({comp,url}) {
    let token=localStorage.getItem("token")
    return token?comp:<Navigate to={url}/>
}
